<?php

/* Web Statistics and Analytics Console (PHP)
 *  generate_data.php
 *  Author: Trevor Bidyk
 *  Created: January 1, 2000
 *  Last modified: April 4, 2011
 *   (C) Us 2011
 *   Uses Simple PHP Framework, licensed under the FreeBSD license.
 *    View license in ./include/LICENSE.
 *   All rights reserved.
 */
require('./includes/master.inc.php');
require('./functions.statistics.php');
$Auth->requireAdmin();

if (isset($_GET['do'])) {
    if ($_GET['do'] == 'home') {
        DisplayHeader('generate', 'generate');
        require_once('./subpages/generate_data/generate.php');
    } else if ($_GET['do'] == 'clear') {
        // DisplayHeader() is in clear.php.
        require_once('./subpages/generate_data/clear.php');
    } else {
        DisplayHeader('generate', 'generate');
        require_once('./subpages/generate_data/generate.php');
    }
} else {
    DisplayHeader('generate', 'generate');
    require_once('./subpages/generate_data/generate.php');
}
DisplayFooter();
?>